package com.ywjh.inter.entity;

import java.io.Serializable;

public class SrcDataValue4G implements Serializable {
    private static final long serialVersionUID = -1L;

    private String sn;
    private String year;
    private String month;
    private String day;
    private String hour;
    private String minute;
    private String data;
    private String model;

    public SrcDataValue4G(String srcData){

        if(srcData.toUpperCase().contains("HIGH") || srcData.toUpperCase().contains("LOW")){
            this.sn = srcData.substring(31,46).trim();
            this.year = srcData.substring(13,15).trim();
            this.month = srcData.substring(16,18).trim();
            this.day = srcData.substring(19,21).trim();
            this.hour = srcData.substring(22,24).trim();
            this.minute = srcData.substring(25,27).trim();
            this.model = srcData.substring(6,11).trim();
            if(srcData.toUpperCase().contains("HIGH")){
                this.data = ""+35;
            }else {
                this.data = "1";
            }

        }else {
            this.sn = srcData.substring(38,54).trim();
            this.year = srcData.substring(20,22).trim();
            this.month = srcData.substring(23,25).trim();
            this.day = srcData.substring(26,28).trim();
            this.hour = srcData.substring(29,31).trim();
            this.minute = srcData.substring(32,34).trim();
            this.model = srcData.substring(13,17).trim();
            this.data = srcData.substring(0,5).trim();

        }

    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public String getHour() {
        return hour;
    }

    public void setHour(String hour) {
        this.hour = hour;
    }

    public String getMinute() {
        return minute;
    }

    public void setMinute(String minute) {
        this.minute = minute;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }
}
